package com.edu.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author:mx
 * @Date:2025/11/3-15:10:11
 */
@Component("c1")
public class Car {

    @Value("${carNum}")
    private String carNum;

    @Value("${carColor}")
    private String carColor;

    public String getCarNum() {
        return carNum;
    }

    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }

    public String getCarColor() {
        return carColor;
    }

    public void setCarColor(String carColor) {
        this.carColor = carColor;
    }

    @Override
    public String toString() {
        return "Car{" +
                "carNum='" + carNum + '\'' +
                ", carColor='" + carColor + '\'' +
                '}';
    }

    public Car() {
        System.out.println("执行了car的构造");
    }
}
